﻿@{
    Layout = null;
}
<div class="bjui-pageContent" id="ArticleContent">
    <div class="bs-callout bs-callout-info">
        <h2>@Model.Article_name</h2>
        <p>@Model.Createtime.ToString("yyyy-MM-dd HH:mm")</p>
        <br /><br />
        @Html.Raw(Model.Article_txt)
    </div>
    @Html.Raw(ViewBag.Replys)
    
    @if (ViewBag.Replaypower == "1")//判断回复权限
    {
        <form action="Wiki/Reply" id="Wiki_reply" data-toggle="validate" data-alertmsg="false" autocomplete="off">
            <fieldset>
                <legend>回复</legend>
                <input type="hidden" id="Article_Id" name="Article_Id" value="@Model.Id" />
                <input type="hidden" id="Parent_Id" name="Parent_Id" value="0" />
                <div class="bs-callout bs-callout-info" id="huifuviv" style="display:none;"></div>
                <textarea name="Reply_txt" id="Reply_txt" style="width: 100%;" data-minheight="200" data-rule="回复内容:required;length(6~)"></textarea>
            </fieldset>
        </form>
    }
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="submit" class="btn-green" data-icon="save">提交</button></li>
    </ul>
</div>
<script>
    function huifu(i, j, k) {
        $('#Parent_Id').val(i);
        $('#huifuviv').html('回复 [' + k + '：' + j + ']').show();
        $('#Reply_txt').focus();
    }
</script>
<script type="text/javascript">

    var test = document.getElementById("Reply_txt");
    test.onkeydown = function (e) {
        send(e);
    }
    function send(e) {
        var code;
        if (!e) var e = window.event;
        if (e.keyCode) code = e.keyCode;
        else if (e.which) code = e.which;
        if (code == 13 && window.event) {
            e.returnValue = false;
        } else if (code == 13) {
            e.preventDefault();
        }

    }
</script>


